<template>
    <div>
        mixin使用
        <ul>
            <li>展示变量{{ limit }}</li>
            <li>展示filter{{ time | formatTime("/") }}</li>
            <li>展示filter{{ time | currency("￥", 3) }}</li>
            <li>展示filter{{ name | formmatName }}</li>
        </ul>
        <input type="text" v-model="num" />
    </div>
</template>

<script>
import mixin from "./mixin";
export default {
    components: {},
    mixins: [mixin],
    props: {},
    data() {
        return {
            limit: 16,
            time: "324243532.7856687",
            num: 9999,
            name: "苏明"
        };
    },
    computed: {},
    // 局部过滤器 自定义指定.filters directives  components
    filters: {
        formatTime(val, flag) {
            console.log(val, flag);
            return "2028年10月19日 14:15:46";
        }
    },
    methods: {
        initData() {
            console.log(123);
        }
    },
    watch: {
        num() {
            console.log("组件watch执行了");
        }
    },
    created() {
        console.log("组件的created");

        this.initData();
    },
    mounted() {}
};
</script>
<style scoped></style>
